package cn.kevinking.ai.mcp.provider.configure;

import cn.kevinking.ai.mcp.provider.utils.McpToolUtils;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

/**
 * @author jinkw
 */
@Component
public class SpringContextHolder implements ApplicationContextAware {
    private ApplicationContext ctx;

    @Override
    public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
        this.ctx = applicationContext;
    }

    public ApplicationContext getApplicationContext() {
        return this.ctx;
    }
}
